import Layout from '@/views/layout'
const asyncRoutes = [{
    path: '/admin',
    component: Layout,
    redirect: '/admin/table',
    name: 'admin',
    meta: {
      title: '管理员管理',
      icon: 'el-icon-menu'
    },
    children: [{
        path: 'table',
        name: 'adminList',
        component: () => import('@/views/admin/index'),
        meta: {
          title: '管理员管理',
          icon: 'el-icon-share'
        }
      },
      {
        path: 'content',
        name: 'adminContent',
        hidden: true,
        component: () => import('@/views/admin/content/index'),
        meta: {
          title: '管理员详情',
          icon: 'el-icon-share'
        }
      }
    ]
  },
  {
    path: '/article',
    component: Layout,
    redirect: '/article/table',
    name: 'article',
    meta: {
      title: '内容编辑管理',
      icon: 'el-icon-menu'
    },
    children: [{
        path: 'table',
        name: 'articleList',
        component: () => import('@/views/article/index'),
        meta: {
          title: '内容列表',
          icon: 'el-icon-share'
        }
      },
      {
        path: 'add',
        name: 'addArticle',
        component: () => import('@/views/article/edit'),
        meta: {
          title: '添加内容',
          icon: 'el-icon-share'
        }
      },
      {
        path: 'edit',
        name: 'editArticle',
        hidden: true,
        component: () => import('@/views/article/edit'),
        meta: {
          title: '编辑内容',
          icon: 'el-icon-share'
        }
      }
    ]
  },
  {
    path: '/news',
    component: Layout,
    redirect: '/news/table',
    name: 'news',
    meta: {
      title: '新闻中心管理',
      icon: 'el-icon-menu'
    },
    children: [{
        path: 'table',
        name: 'NewsList',
        component: () => import('@/views/news/index'),
        meta: {
          title: '新闻列表',
          icon: 'el-icon-share'
        }
      },
      {
        path: 'add',
        name: 'addNews',
        // hidden: true,
        component: () => import('@/views/news/edit'),
        meta: {
          title: '添加新闻',
          icon: 'el-icon-share'
        }
      },
      {
        path: 'edit',
        name: 'editNews',
        hidden: true,
        component: () => import('@/views/news/edit'),
        meta: {
          title: '编辑新闻',
          icon: 'el-icon-share'
        }
      }
    ]
  }
]
export default asyncRoutes